# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kphotoalbum
pkgver=5.8.1
pkgrel=1
pkgdesc="KDE Photo Album, picture collection manager"
url="https://kphotoalbum.org"
# armhf blocked my extra-cmake-modules
# ppc64le, s390x and riscv64 blocked by polkit -> kio
arch="all !armhf !ppc64le !s390x !riscv64"
license="GPL-2.0-or-later"
makedepends="
	exiv2-dev
	extra-cmake-modules
	jpeg-dev
	karchive-dev
	kcompletion-dev
	kconfig-dev
	kcoreaddons-dev
	kdoctools-dev
	ki18n-dev
	kiconthemes-dev
	kio-dev
	kjobwidgets-dev
	ktextwidgets-dev
	kwidgetsaddons-dev
	kxmlgui-dev
	libkdcraw-dev
	libkipi-dev
	marble-dev
	phonon-dev
	purpose-dev
	qt5-qtbase-dev
	samurai
	"
checkdepends="xvfb-run"
subpackages="$pkgname-doc $pkgname-lang"
source="https://download.kde.org/stable/kphotoalbum/$pkgver/kphotoalbum-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
3a9eec3a12cd95c7bb0806185d7937346acd68ff29858f3cbbe5d4c0c350ff84f55282231dd3800fc5393d72d5563aa7207ec68122057079ba20e82239c6181c  kphotoalbum-5.8.1.tar.xz
"
